﻿<UserControl x:Class="WiiLuvScumm.Dialogs.SettingsDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:Data="clr-namespace:Data;assembly=Data"
             mc:Ignorable="d" 
             x:Name="SettingsControl"
             d:DesignHeight="800" d:DesignWidth="800"
             Width="{Binding Width, RelativeSource={RelativeSource AncestorType={x:Type Window}}}"
             Height="{Binding Height, RelativeSource={RelativeSource AncestorType={x:Type Window}}}">
    
    <Grid Background="#F0FFFFFF">
        
        
    <Grid Width="700"
          Height="700">

            <Border BorderBrush="#77000000"
                    Background="White"
                    BorderThickness="2"
                    CornerRadius="5"
                    Margin="0"
                    ClipToBounds="False">
                <Border.Effect>
                    <DropShadowEffect BlurRadius="4"
                                      Color="DarkGray"
                                      Opacity="0.8"/>
                </Border.Effect>
            </Border>
    <Grid Margin="10">
        <Grid.ColumnDefinitions>            
            <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="60" />
                </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="20" />
            <RowDefinition Height="*" />
            <RowDefinition Height="20" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>
        <!--
        Header
        -->
                <Button Command="{Binding HideSettingsCommand}"
                Grid.RowSpan="2"
                Grid.Column="1"
                Margin="6" >
            <Button.Template>
                <ControlTemplate>
                    <Grid>
                        <Image Source="pack://application:,,,/Assets;component/Media/close.png" 
                               Height="25"
                               VerticalAlignment="Top"
                               HorizontalAlignment="Right"/>
                    </Grid>
                </ControlTemplate>
            </Button.Template>
        </Button>
        <TextBlock Text="General Settings"
                   FontFamily="Segoe UI Light"
                   FontSize="32"
                   FontWeight="DemiBold" Grid.Column="0" />
        <TextBlock Text="Define paths for needed software."
                   Grid.Row="1"
                   FontFamily="Segoe UI Light"
                   FontWeight="DemiBold"
                   FontSize="22" Grid.Column="0" />
        <Separator Grid.Row="2" Grid.ColumnSpan="2" Margin="0,2" />
        
        <!--
        Main part
        -->
        <Grid Grid.Row="3"
              Grid.ColumnSpan="2">
                   
                        <Grid.ColumnDefinitions>

                        <ColumnDefinition Width="20" />
                        <ColumnDefinition Width="Auto" />

                        <ColumnDefinition Width="20" />
                        <ColumnDefinition Width="300" />

                        <ColumnDefinition Width="20" />
                        <ColumnDefinition Width="*" />

                        <ColumnDefinition Width="20" />
                    </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="40" />
                        <RowDefinition Height="25" />

                        <RowDefinition Height="20" />
                        <RowDefinition Height="40" />
                <RowDefinition Height="25" />

                        <RowDefinition Height="25" />
                        <RowDefinition Height="*" />
            </Grid.RowDefinitions>

       

            <TextBlock Text="Choose ScummVM:"
                       Grid.Row="1"
                       Grid.Column="1"
                       FontFamily="Segoe UI"
                       FontSize="20" 
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"/>
            <!--
            File chooser
            -->
                    <Grid Grid.Column="3"
                          Grid.Row="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                                
                        <TextBox FontSize="24" 
                                 Text="{Binding GameManager.Settings.PathToScummVMexe,UpdateSourceTrigger=PropertyChanged}"
                                 ToolTip="{Binding GameManager.Settings.PathToScummVMexe}"
                                 Foreground="#777777"/>
                        <Button Content="browse..."  
                                Grid.Column="1"
                                Foreground="White"
                                Background="BlueViolet"
                                FontSize="20"
                                Padding="10,0"
                                Margin="4,0"
                                Command="{Binding ChooseScummVMPathCommand}"/>





                    </Grid>

                    <TextBlock Text="Select the location of scummvm.exe"
                       Grid.Row="2"
                               Grid.Column="1"
                       Grid.ColumnSpan="3"
                       FontFamily="Cambria"
                       FontSize="20" 
                       Foreground="#BB000000"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"/>


            <!--
            GlovePie Path
            -->
                    <TextBlock Text="Choose GlovePie:"
                       Grid.Row="4"
                       Grid.Column="1"
                       FontFamily="Segoe UI"
                       FontSize="20" 
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"/>
                    <!--
            File chooser
            -->
                    <Grid Grid.Column="3"
                          Grid.Row="4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>

                        <TextBox FontSize="24" 
                                 Text="{Binding GlovePiePath,UpdateSourceTrigger=PropertyChanged}"
                                 Foreground="#777777"/>
                        <Button Content="browse..."  
                                Grid.Column="1"
                                Padding="10,0"
                                Command="{Binding ChooseGlovePiePathCommand}"
                                Margin="4,0"
                                FontSize="20"
                                Background="BlueViolet"
                                Foreground="White"/>





                    </Grid>

                    <TextBlock Text="Select the location of GlovePie.exe"
                       Grid.Row="5"
                               Grid.Column="1"
                       Grid.ColumnSpan="3"
                       FontFamily="Cambria"
                       FontSize="20" 
                       Foreground="#BB000000"
                       HorizontalAlignment="Right"
                       VerticalAlignment="Center"/>



                </Grid>
        
    </Grid>

        </Grid>

    </Grid>
</UserControl>
